﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WaterCompanyPage.aspx.cs" Inherits="WaterApp.QueryReport.WaterCompanyPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>企业用水量分析</title>
    <link href="../Styles/if.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/Site.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Scripts/jquery-ui-1.9.1.custom/js/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="../Highcharts/js/highcharts.js"></script>
    <script type="text/javascript" src="../Highcharts/js/highcharts-more.js"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            buildzEstimation();
            buildYmyongshuiAear();
        });
        function buildzEstimation() {
            var pValue = "F1001";
            jQuery.ajax({
                type: "post",
                url: "/Business/Ajax.aspx",
                data: "paramvalue=" + escape(pValue) + "&paramtype=BuilderChart",
                success: function (message) {
                    if (message != "NONE") {
                        var data = eval("(" + message + ")");
                        var char1 = new Highcharts.Chart({
                            chart: {
                                renderTo: 'repqiyeyshu',
                                type: 'line'
                            },
                            title: {
                                text: data.charttitle
                            },
                            xAxis: {
                                categories: eval(data.categories)

                            },
                            yAxis: {
                                //                            allowDecimals: false,
                                min: 0,

                                title: {
                                    text: ' '
                                },
                                labels: {
                                    formatter: function () {
                                        return this.value;
                                    }

                                }, lineWidth: 1
                            , tickInterval: 100
                            , tickmarkPlacement: 'on'

                            },
                            tooltip: {
                                formatter: function () {
                                    return '<b>' + this.x + '</b>' + ': ' + this.y; //'<br/>' 
                                    //+this.series.name + ': ' + this.y + '<br/>'; // +'合计: ' + this.point.stackTotal;
                                }
                            },
                            marker: {
                                enabled: false//是否显示点  

                            },
                            credits: {
                                enabled: false     //去掉highcharts网站url  
                            },
                            series: [{
                                name: data.seriesname,
                                data: eval(data.seriesdata),
                                marker: {//系列在坐标刻度点上的标记属性设置

                                    enabled: false//是否启用标记
                                }
                            }]
                        });
                        //                    $("#divprocess").hide();
                    }
                    else {
                        //                    $("#divpgtsh").html("估算失败！");
                    }
                },
                error: function () {
                    //                $("#divpgtsh").html("连接服务是发生异常！");
                }
            });
        }
        // 区域居民用水量监测/万立方
        function buildYmyongshuiAear() {
            var pValue = "F1002";
            jQuery.ajax({
                type: "post",
                url: "/Business/Ajax.aspx",
                data: "paramvalue=" + escape(pValue) + "&paramtype=BuilderChart",
                success: function (message) {
                    if (message != "NONE") {
                        var data = eval("(" + message + ")");
                        //alert(data.categories);
                        var char1 = new Highcharts.Chart({
                            chart: {
                                renderTo: 'repquyuyshu',
                                type: 'column'
                            },
                            credits: {
                                enabled: false     //去掉highcharts网站url  
                            },
                            title: {
                                text: data.charttitle
                            },
                            xAxis: {
                                categories: eval(data.categories),
                                labels: {
                                    rotation: -45,
                                    align: 'right',
                                    style: {
                                        fontSize: '11px',
                                        fontFamily: 'Verdana, sans-serif'
                                    }
                                }
                            },
                            yAxis: {
                                allowDecimals: false,
                                min: 0,
                                title: {
                                    text: ''
                                }
                            },
                            tooltip: {
                                formatter: function () {
                                    return '<b>' + this.x + '</b><br/>' +
                        this.series.name + ': ' + this.y + '<br/>' +
                        '合计: ' + this.point.stackTotal;
                                }
                            },
                            plotOptions: {
                                column: {
                                    stacking: 'normal',
                                    dataLabels: {
                                        enabled: true,
                                        color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
                                    }
                                }
                            },
                            series: [{
                                name: data.seriesname,
                                data: eval(data.seriesdata)
                            }]
                        });
                    }
                    else {
                        //$("#divpgtsh").html("估算失败！");
                    }
                },
                error: function () {
                    //$("#divpgtsh").html("连接服务是发生异常！");
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div style="width:100%; background-color: #E0E0E0; height:30px; 
                    font-family:宋体; font-size:12px; font-weight:bold; line-height:30px;">
          查询和报表=>企业用水量分析
        </div>
        <div>
          <table>
            <tr>
              <td>
                <div id="repqiyeyshu" style="width:400px; height:300px; border:1px soid #dcdcdc;">
                  
                </div>
              </td>
              <td>
                <div id="repquyuyshu" style="width:400px; height:300px; border:1px soid #dcdcdc;">
                  
                </div>              
              </td>
            </tr>
          </table>
        </div>
    </div>
    </form>
</body>
</html>
